<div class="clear-both">&nbsp;</div>
<div class="detail-container full">
<ul>
	<li>
		<strong><?php echo $this->escape($this->entry->title); ?></strong>
		<p>
			by 
			<a target="_top" href="<?php echo $this->user_link;?>">
				<?php echo $this->entry->getCandidateName();?> 
			</a>
			on 
		<?php echo date('d M, Y', $this->entry->time_uploaded);?> 
			| <?php echo $this->pageViews($this->entry->views);?>
		</p>
	</li>
	<li>
		<div class="photo_container img">
			<img style="max-width: 750px" src="<?php echo STATIC_URL . '/media/image/' . $this->entry->image; ?>" />
		</div>
	</li>
	<li>
		<div class="photo_detail">
			<p class="entry-description">
				<?php echo $this->escape($this->entry->description); ?>
			</p>
			<?php echo $this->form;?>
		</div>
	</li>
</ul>
<div class="clear-both">&nbsp;</div>
<script>
jQuery("document").ready(function($){
	addTab('<?php echo $this->escape($this->entry->getContest()->title) ?>', '<?php echo $this->url() ?>');
	
		function is_int(value){
			if((parseFloat(value) == parseInt(value)) && !isNaN(value)){
				return true;
			} else {
				return false;
			}
		}
		
		function isValidScore(value){
			if(is_int(value)){
				if(parseInt(value)>=1 && parseInt(value)<=10){
					return true;
				}
			}
			return false;
		}
		
		$('input[type=submit]').click(function(){
			
			if(!isValidScore($('#score1').val()))
			{
				alert('<?php echo $this->translate('MSG_ERROR_SCORE_1_MUST_BE_INT');?>');
				return false;
			}
			
			if(!isValidScore($('#score2').val()))
			{
				alert('<?php echo $this->translate('MSG_ERROR_SCORE_2_MUST_BE_INT');?>');
				return false;
			}
		});
});
</script>